Fix usage of assert

nothing serious, this came up while wading through the code.