Fixed problems with resource template