Fix build/debug scripts