modify slave init script as it didnt always work