bug fixes in template revealed while trying to integrate into vistraisl gui