fixed ResultTypeListener "undefined index" warning
fixed Context ending