Added proper redirection for undefined keys