Log message was using wrong variable