fix function Set bug