Fix access to app_type in template