better redirect in the wrapper