             instr-map (get (:contents active-tape) (:position active-tape))]
         (if instr-map
           (trace 'gtm_close
-                 (push-item (:close instr-map) :integer state))
+                 (update-in
+                   (push-item (:close instr-map) :integer state)
+                   [:gtm :tapes active :position]
+                   inc))
           state))
       state)))
 

                 (100 code_rand                   ;;     set instruction randomly
                      gtm_set_instruction)
                 gtm_copy                         ;;     or copy it
                 gtm_tape1 gtm_right))
        run-pgm #(run-push pgm %)]
    (println "g:" g)(newline)
    (println "result:"

                 (-> state
                     (assoc-in [:gtm :tapes 0 :contents destination-position] 
                               source-instr-map)
                     (update-in [:gtm :tapes 0 :position] inc)
                     (update-in [:gtm :tapes source :position] inc)))
          state))
      state)))

