Fix for bug #57, update no longer clobbers primary keys