float to int conversion error - fix #10