finally fixed the ring insertion issue