bug fix: input retains previous value in result_data()