fixed refs of nested items hackily