Added changes from rev5c to rev 6a