Template fixes for rgw