Added window attribute to app_delegate