diff --git a/app/services/statuses_search_service.rb b/app/services/statuses_search_service.rb
index e2a5f41b1..7d5b0203a 100644
--- a/app/services/statuses_search_service.rb
+++ b/app/services/statuses_search_service.rb
@@ -39,12 +39,12 @@ class StatusesSearchService < BaseService
     end
 
     if @options[:min_id]
-      timestamp = Mastodon::Snowflake.to_time(@options[:min_id])
+      timestamp = Mastodon::Snowflake.to_time(@options[:min_id].to_i)
       syntax_options << "after:\"#{timestamp.iso8601}\""
     end
 
     if @options[:max_id]
-      timestamp = Mastodon::Snowflake.to_time(@options[:max_id])
+      timestamp = Mastodon::Snowflake.to_time(@options[:max_id].to_i)
       syntax_options << "before:\"#{timestamp.iso8601}\""
     end