                             let a = UIAlertController(title: "Error sending pic",
                                 message: Optional.None,
                                 preferredStyle: .Alert)
+                            
+                            a.addAction(UIAlertAction(title: "Ok", style: .Cancel) { (action) in
+                                a.dismissViewControllerAnimated(true, completion: nil)
+                                })
+                            
                             ctrl.presentViewController(a, animated: true, completion: nil)
                         }
                     }

            switch(msg) {
                
                case let t as UICmd.OnPicture:
                    let ack = RemoteCmd.TakePicAck(sender: self.this)
                    ^{alert.dismissViewControllerAnimated(true, completion: nil)}
                    do {try self.session.sendData(NSKeyedArchiver.archivedDataWithRootObject(ack),
                        toPeers: self.session.connectedPeers,
                        withMode:.Reliable)
                    } catch let error as NSError {
                        print("error \(error)")
                    }
                    let resp = RemoteCmd.TakePicResp(sender: self.this, pic:t.pic, error: t.error)
                    do {try self.session.sendData(NSKeyedArchiver.archivedDataWithRootObject(resp),
                        toPeers: self.session.connectedPeers,
                        withMode:.Reliable)

                        UIImageWriteToSavedPhotosAlbum(image, self, "image:didFinishSavingWithError:contextInfo:", nil)
                    }else if let error = picResp.error {
                        ^{
                            let a = UIAlertController(title: error.domain, message: error.localizedDescription, preferredStyle: .Alert)
                            
                            a.addAction(UIAlertAction(title: "Ok", style: .Cancel) { (action) in
                                a.dismissViewControllerAnimated(true, completion: nil)
                            })
                            
                            lobby.presentViewController(a, animated: true, completion: nil)
                        }
                    }
                
