Fixing minor bugs related to the database migrations