Fix setOnIndexChangedListener in PanesLayout