Fix bug with static method defined as non-static