fix a seg fault in this application if no context paramater is given