fixed bug in implementation of LOG