Linux fixes. Confirmed as working.