Fixed issues according to SensioLabsInsight #2