GUI open and close fixed