improved gui behavior