fixed test sorting templates