Fixed some stupid math on logging.