[#365] fixed stop throwing an exception after completion

porting from main branch