Fixed error for empty output