Fixed two bugs in each library and typos in lcgc.php.