made the scriptsystem handle runtime errors