correct cursor adding and deleting