fixed class db free() psql