Fix check in endemergency for config.emergency