Fixed typo and minor bug (for #119)