Fixed bug in assert