Fix bug in assert helper