fixed namespace typo and some errors