fix bug for pyqt4, where filename is not a tuple