ensure we always cleanup even in strange cases