Fixes to pass test suite