nullpointer bugfix