Fixing persistance tests and run_app