redirect to previous page fix