In his philosophical writings, Averroes attempted to return to Aristotelianism, which according to him had been distorted by the Neoplatonist tendencies of Muslim philosophers such as Al-Farabi and Avicenna. He rejected al-Farabi's attempt to merge the ideas of Plato and Aristotle, pointing out the differences between the two, such as Aristotle's rejection of Plato's theory of ideas. He also criticized Al-Farabi's works on logic for misinterpreting its Aristotelian source. He wrote an extensive critique of Avicenna, who was the standard-bearer of Islamic Neoplatonism in the Middle Ages. He argued that Avicenna's theory of emanation had many fallacies and was not found in the works of Aristotle. Averroes disagreed with Avicenna's view that existence is merely an accident added to essence, arguing the reverse; something exists per se and essence can only be found by subsequent abstraction. He also rejected Avicenna's modality and Avicenna's argument to prove the existence of God as the Necessary Existent.