Fixed a misstaken python function