Fixed variable type errors