Fixing update elementValue problem