Amended code to fix failing tests in user contr and model specs