Fix hang in initialize_db script