fix template signature generation