bug fix (uncaught potential nullpointer)