Fix https://github.com/pyQode/pyQode/issues/6 and https://github.com/pyQode/pyqode.core/pull/153