fixed printing of database