Made sure the original function is only called once.