Fix bugs with static method