fixed bug parsing output