Fix a warning of type cast