fixes issue #240
partway through fixing issue #240