fixed editDatabase