Working on fixing issues with nested templates