Some fixes to tests