fix problems with release/debug and asserts