fix for issue #393
Merge pull request #492 from Azaezel/393B

Fix for issue #393