fixed warning as error (linux gcc) for implicit type conversion