Fixed some possible NPEs