fix the undefined problem