Fixed bug where delete did not perform immediately

There was a bug in delete when it is performed while being logged in.

This commit fixes the bug.