Fixed race condition when hiding pointer