re-enabled LEAVE_AFTER_ENTER which was disabled for debugging.