Fix annoying compile warning due to missing cast