Bug fixed: data disappeared when app was closed