Fixed small bugs and typos