removed trailing comma from fields array