attempt to solve a crash with a nullpointer exception