a quick fix to remove function recreation.