Please review the value of hidden input.

Last comma from hidden field value dissapear, because of split or explode functions in backend scripts.