Security/fix brakeman issues