Slave code slightly changed to make temp error behaviour the same as for the master.