merge linux fixes from james