fix issue pointed out by mstrisoline in the python method generation