Template directory fix