Fixed a subtle bug