Fixed broken centerItemWhenSelected functionality