fixed bug with redirection - Gary