Fix remaining cases of db reads on the main thread (Untested, likely broken)