fixed Linux porting issues

issue #1, #2 in the issue tracker log