Lose focus bugfix