Fixed some templeate issues to be released as v0.3.1.