patches the NullPointerException on db reset