Fixes logic for displaying the type of template