It seems to me like this fixes issue #50.