Fix several visibility issues