Fixed corner case bug identified by Steven Tremblay.  Thanks