fix error with recirect