fixed memory issue with multiple motivations