Fragment program improvements and stat fixes