fix ASSERT in the correct way