fixed library and home template ref #246