Fixes a bug when fast switching could stall the app