bug fix for #328 checkin; also test of cose