Set variables correctly