fixed a few things in templates