Fix for  redirect() method in lib.php