fixed bug with log data being overwritten