Fixed the implementation of 'mk_type' so it passes all of it's tests.