Fix NPE in EntrancePI

This fixes an NPE with S4. However there still are some problems with S4. See #48