Fix for bug discovered by YRS.