small fixes
 - Linux compatibility
 - other minor fixes