Fixed undefined variable error and old include