First version that fixes issue #346