This fencepost error is killing me