small bug fix in template
another small bug fix