Fixed a possible edge-case bug.