Fixed bug causing data set via template_data() to not be applied