Fix distribution and visiblity errors