small fixes
added additional asserts