fix for issue #365
Merge pull request #489 from Azaezel/365

fix for issue #365