better fix for github issue #50