Fixing update bug