some fixing to support linux