Changed the check on  to do a count, rather than a simple truthy check.