fixed bug in redirect() when only 2 args are passed