Fix conditional of gapi