fix bug in the script optim_database_converter.py