Get rid of spurious db queries