small Python fixes