Fix bug on typedef and undefined