Trying to fix gui crash bug.