Fixes integer conversion