Test
Fix error when app is nil
Fix error when app is nil