bug fixes, more templates