Fixed program selection on iOS

Overall much better method for program selection