fixes issue #497