Fix crashing bug; make GC less laggy by making collections more frequent