fix some typo and remove hacks