Fixed invalid visibility bug in libraries