fix redirect_to called multiple times