Fix removeCursor injection by timeout