fix function delete related