Fixed assertion macro bug. Added regression test.