Fixed minor code flaw