Fixed a minor code bug