Added a cast that got rid of warnings.