use instance variable when indexing

Missed this when converting over. Oops
various porting fixes