bugfix, debugging added asserts