Set ctx in a variable