fixed small bug in templates