Context destroy bugfix