prevent overwriting container contents in some cases, clear in others