Change setq to defvar to fix compile warnings