fixed has_key-error when not authorized