context reference erro fix