fix fill selects function