Made it more compatible with the GUI