fixed a bug that caused duplicate entries to be added when updating