Bug fix on convert.type