Bugfix with redirect and more trace output.