refactor + fix bug call delegate when selected view controller at index