bug fixes

everything is working, but the whole redirection stuff is all messed up