Fixed caching in Gatekeeper function.
Normalized output from the gatekeeper function.