Clear excess parts of contexts when finalizing