portability fix on lib, remove unused variable $Id