corrected second error for empty