small fix on float to int conversion