fixed bugs due to typos