Fix for 'None' at the end of subprocess