fix the reload function.