Logic typo + cleanup templates