Calling cuisql made conditional