Springboks made to work for win