Fix several failing test cases.