Fix two Null Pointer Exceptions during setup