fixed extra comma in output bug