fix several display bugs