Incorporate syntax error fix patch from Andrew Ruder