Fixed view reset issue after database is updated