change template list count.
small modified.
more bugs repair.