small changes to make it compile in linux