correct log variable error done by me