Fixed duplication of contexts