bugfix after merging master - dynamic memory caused contexts not to be destructed