Delete bug existed, query issue

There are some issues have not addressed.