try to fix infinity loop in lucky replacements. fitst take :-)