fixed a return in python object