Fixed indexing error in interactive mode.