got rid of unnecessary casts from int to jint, made compile fail on windows