fixes issue #33: buildLog may not be allocated correctly