Fix unfocus behaviour