Fix vars and tests