"fixed" compilation error, new errors

the double that was causing a warning was cast as an int to avoid
compilation errors