NullpointerExceptions behoben.