fixed class initialisation errors