Crash-Bugfix

Prevents a NPE in some cases