fixed up gatekeeper