BUG: fixed bug on float casting