fixed #1146

Fix for issue https://github.com/appium/appium/issues/1146