Fixed patch which is broken on linux