fix building order of scripts

I should really use require.js here
prepare 1.4.0