Fix redirect when submit dialog