Fixed a minor error in DBOperator. It should no longer go 1 beyond the range of the array.