fixed persistence and redirect