Fix some issues found by landscape.io