Fixing Brakeman reported error