remove debug log and fix float to int error