Fix bug in contextWithDelegate: