fixed lostfocus bug