Tried to fix some GUI portability problem