Improve autoredirection mechanics