Fixed a potential bug