fix bug in view with extra comma