fix template display issue