Fixed initialisation errors found in tests