Fixed indexing error in setting booleans