use auto when possible

fix typo