Correctly pass the bag data to the template renderer