Fix for issue #1587
Merge pull request #1602 from ghost1227/bugs/1587

Fix for issue #1587