fix some issues from insight.sensiolabs.com