added testcase and fix on completed event