added check for empty. refs 4298