Added charupdate event handler