Fixed error in logging