fixed typo and polluting global :)