fixed a small bug caused by order of commands in build.sh