fixing Linux implementation