bugfix: python code