fixed redirect problem