Fixed boolean->Integer bug