fix bug in selecting decomposed api