Fixed a potential bug.