fixed bug when brick.quit() is called without event driven mode. Need to rewrite ScriptEngineWorker code to avoid further such errors