fixes issue 1998
Merge pull request #534 from niphlod/fix/1998

fixes issue 1998