Fix empty case of ring function