Close the hive db connection when exiting
varition offset by 1 bug
Merging postreleasefix/78 to release/78

* postreleasefix/78:
  varition offset by 1 bug
  Close the hive db connection when exiting