Fix for timestamp comparison