Fix issue where sticky marker happens because cursor goes off window