Fix redirect bug on search