Fixed issues reported by SensioLabs Insight