Fixed Brakeman warnings