Change error when tag is not formatted
improve example
fix bug with getType()