Fix inconsitent db schema