Fix some exceptions related to schema changes