fix commas in template tag

fix #409
fix location ordering alphabetically

fix #394