Fix typos
Fix DefinitionException thrown by checkDisposalMethod