fixing issues in relation to https://github.com/ios-driver/ios-driver/issues/56