Fixed controller bugs when redirecting to an action