fixes issue #525