fixing build errors w/ index'ing trait