Fix backward compatibility of niceness handling on non-Windows
Fix TypeError