Many small bug fixes due to visibility