fixed delete and edit errors