fix data logging