[BUGFIX] Do not use first sub template as main template, fixes #206