optimize test arrangement, fix typo