Changing order of scripts to mak ensure gapi is defined