[FIX] Initializing more members, a bit more error handling in apps.