GUI works but not well