Fixed focus restoring issue #384