fix build in debug mode

wrong variable in assert