bugfixes for code sandboxing