Fixed a bug caused by another bug.