Better redirect function, fixed some more redirect paths