Improved the implementation of GetDosStub()