Repaired nullpointer