Fixed gapi not being defined.