fix focus bugs