mali fix from TC sources