handle ugly ui on toggle