fixed the multiref slice building code.