tidy up path setting