Fixing the error with mass assignment