corrected sending wrong value bug