fix currentItem not working in edit dialog