added sleep before restarting services