fix off by one error in copy_db_to_head
Merge pull request #491 from Incubaid/copy-db-to-head-off-by-one

fix off by one error in copy_db_to_head