Dream interpretation anxiety dreams and nightmares was the result of failures in the dream-work: rather than contradicting the "wish-fulfillment" theory, such phenomena demonstrated how the ego reacted to the awareness of repressed wishes that were too powerful and insufficiently disguised. Traumatic dreams (where the dream merely repeats the traumatic experience) were eventually admitted as exceptions to the theory. Freud famously described psychoanalytic dream-interpretation as "the royal road to a knowledge of the unconscious activities of the mind"; he was, however, capable of expressing regret and dissatisfaction at the way his ideas on the subject were misrepresented or simply not understood: On another
Dream interpretation treatise on dreams, in which he was the first to distinguish between dream interpretation and the nature and causes of dreams. In "The Canon of Medicine", Avicenna extended the theory of temperaments to encompass "emotional aspects, mental capacity, moral attitudes, self-awareness, movements and dreams." Ibn Khaldun's "Muqaddimah" (1377) states that "confused dreams" are "pictures of the imagination that are stored inside by perception and to which the ability to think is applied, after (man) has retired from sense perception." Ibn Shaheen states: Interpretations change their foundations according to the different conditions of the seer (of the vision),so seeing handcuffs during