Comments on setup_stack code and small fix