Made a return generator for convenience
Failing test that redirect error is raised on infinite loop