fixed some ASSERT errors