fixing networkcontext in define permission