tidy up and make sure that PS1 is exported