Lottery malfunction in iOS-app