Fixed bug with missing declaration of variable and the app delegate interface function