fix focus/resize issue