another attempt to solve redirection problems