fix stack.sh bug running twice