fix entrance and exit