Bugfixing invalid context access