fix for issue #561 removing empty lines (python 3)