fix ensureDot logic