Fixing redirect problem