More tests
Fix not setting the type attribute properly