fixed some display bugs