Fix self template variable for subapps