Python fixes

Two small fixes for the python parsing.