Fix a few launchpad bugs relating to syntax errors

Should I be adding tests for these somewhere?