quick and dirty fix for redirection bug