fixed assert, from Alex