Fixed an infinite loop problem.  And a segfault relating to copying the current frame pointer to the prev_frame