fix a bug that the context of Function member method cannot be changed