Fix the bug of version comparison logic