More fixes regarding to db schema change.