[db] Bug when resources getting duplicated when loading them at the start