Update compile scripts

Making Sure register happens before the build in the compile scripts