 					}, completion: {
 						_ in
 						
-						self.coinView.layer.contents = UIImage(named: "coin-heads-medium.png").CGImage
+						self.coinView.layer.contents = UIImage(named: "coin-heads-medium.png")!.CGImage
 						self.doAnimation()
 					})
 			})

			}, completion: {
				_ in
				
				self.coinView.layer.contents = UIImage(named: "coin-tails-medium.png").CGImage
				UIView.animateWithDuration(self.animationDuration, delay: 0.0, options: UIViewAnimationOptions.CurveLinear, animations: {
					
					var rotation: CATransform3D = self.coinView.layer.transform;


		if ( repeatCount++ > maxReps ) {
			
			coinView.layer.contents = (Int(arc4random()) % 2 == 0) ? UIImage(named: "coin-tails-medium.png")!.CGImage : UIImage(named: "coin-heads-medium.png")!.CGImage
			coinView.layer.transform = CATransform3DIdentity
			flipButton.enabled = true
			
