Auto restarting if SyntaxError exception has occurred

Dirty way to fix #681