Bugfix NullPointer exception