Made some type conversion explicit for fmod