various fixes but wrapping still fails