cosmetic merge with original

cosmetic merge and carry forward of bug fixed from original. No
functional changes.