fixed index leaking and get/index for id:0 w/ tests