memory consumption reduced, database encoding fix