fix focus functions