Some fixes to the Python units implementation.