fixed boolean array indexing