fixed redirect and migration