Template problems fixed