Fix

various fixes notified by insight tool (https://insight.sensiolabs.com/projects/84018111-5762-4f37-932a-1777acaa1d8f/analyses/15)