Move the 404 check outside of setupController