Fix some bug since database models changed.