bug fixes for statmn and older variable settings