Fixed push/pop handling