A try to fix error when app when app switch from background to
foreground