Bug fixed, first pop s:stack and then upward s:cursor.