fixing the weird redirect