Some test fixes

Ref #1087