fix assertion side effects