Fix some unit tests for #2302