minor stack and calc update