Added multiple cursor support