corrected possible erroneous output