Fix Mantis 987 from Nathan Schwartzman.