fixed indexing in logic
fixed indexing in reals
fixed indexing in logic