Possible NPE fixes