Fixed memcpy in partition_db (again)