fixed unexpected bugs on edit and delete test