fixes and more useful assertions