fixing the log error