Fix compile error in python wrapper