added Mike Pall's temporary workaround for fixing a segmentation fault when a lua error is thrown.