Proper fix for the shellcode regeneration bug.

Also fixed a small menu iteraction bug when exiting a payload menu.