did prompt change kinda

prompt change crashes if it is the first command run.
runs fine if it is the second call or after.
crashes on exit. i am not sure what is wrong. variables seem to be fine
when inspected in debug mode. i am sure it is something simple i am
missing.