fixed bugs where doubled context was being accessed resulting in default behaviour always being used

Change-Id: I1a8d9ae0448b5d56219c392d5d48c8638c98e36d