Logging the wrong value