workaround for MOVE cursor (github #2358), other cleanups