debugged few output error