fixes issue #500