Second part of patch from Arthur D.