Fix travis build and refactor `$selectedarr` to `$selected_arr`