Fix for #7 with demo code in iOS sample app