Fix NullPointerException
FindBugs fixes