Edited the GUI so that it works without errors