fixed problem with history interfering with data