fixed bug in replace_dots