Fix possible problems with cursor access.
Store column indices and preferences values in class variables.