Fix module instances deletion on module stop