fix some display bugs.