Fix NPE due to auto boxing