Insight fixes

Fixes for https://insight.sensiolabs.com/projects/af8f8d39-3890-46f7-bb73-f39c09510cd3.