WIP Fix the stack logic