bringing in type width check from svn