Fix a missing cast