fixed export of some varaibles
updates to make prompt and history work right