fixed mysterious assertion error