minor changes to unwrap.