Fixes freeze on lose focus