Rewrite base controller so it works as expected.