small bugs and typos are fixed