Workaround for mysterious OSX focus problem.