fix sorting value in python plugin