Merge pull request #1279 from ghost1227/master

Fix for issue #1264
Merge pull request #1280 from ghost1227/master

Fix for issue #1274