Fixed bug when applying to multiple cursors