Fix for #1330
Merge pull request #1331 from ghost1227/bugs/1330

Fix for #1330