fix variable not initializing