Correct some commands run during build process to use proper variables