Fix: wrong update and delete