corrected update bug