lot of small errors fixed