merged fixes from http://github.com/andviro/jedi.git