Make code of init script more right