Trying to fix gui slowdown