corrected order of push/pop

fixed "minimum stack depth reached" error