Stack implementation after bug fixes