Fixed an NPE due to autoboxing