Fix for #1521
Merge pull request #1525 from ghost1227/bugs/1521

Bugs/1521