Looks like Xi was trying to undermine POTUS' NK summit. This report may explain the change in attitude by Kim after meeting Xi the second time.
China will get outplayed however.
http://news.donga.com/3/all/20180528/90275869/1 (use an online translator to read it)