god awful workaround for a lua thread hanging bug