Added another guard that protects against shutdown errors.

Leo build: 20140825122510