Fix issues in stack