Correcting error - ContextErrorException: Notice: Undefined variable: kernel.
Merge pull request #1750 from shefik/1.4

Correcting error - ContextErrorException: Notice: Undefined variable: kernel