Modifications originating from Linux port (thanks falkTX)