fixed removeDefinition problem