Fixed undefined variable warnings in the compiler