added unit test and fixed ordering of type converters