Added fallback for undefined template names