backport of small changes that I made in the private SYMC copy