a bug in type smashing, also add a name checking for default