wp/CAROLINE-49/1: fix some bugs.