Fix failing tests: assertion couldn't be right