remove trailing comma after last hash