fixing typos and small bugs