fixed uninitialised pointers