fixes issue #32: buildLog may not be allocated correctly