fixes a few issues with set_block (add/remove blocks would have fatal errors) but leaves unresolved issues with caching