Better redirection handling in activity edition