fixed history handling of implicit cd