remove redundant assert, make error message more descriptive