bug fix

changed away from empty() which bring up an error in other versions of
php