fixed bug with cur_value