fixing bugs and displaying type labels