changed t/f to 1/0 representation of boolean, fixed bad index reference