Fix for #1309
Merge pull request #1313 from ghost1227/master

Fix for #1309