Fix build scripts for apps