CFY-1373 fixed ctx to struct