adding fix from ErtugKaya for issue #2