Fixing annoying focus bug