Fixes and tweaks prior to RC1
Fixing failing unit tests.