Fix uninitialised array error