Fixing initialization problem if the GUI is not set yet.