Fix bug oncompleted