small Bugfixes

prevent NullPointerExceptions