Fix init bug
Replace last seds with perl