Misc fixes due to failing tests