Fixing app delegate