Fixed a critical bug that cannot invoke method sometimes