fixed typo in log function