quick fix for handling redirection