Fixed up asserts, changed debugging.