Fixing mass assignment errors