Fixed logic issue.