template fixed a bit