Fix loss of focus - issue #29