Fixed typos and added some test cases