remove trailing comma which throws parse error in IE