Various fixes to get tests running on jenkins