Close connections after creating the tables