fix marksToCarets