got rid of garbage in template