fix blend function