Use take instead of first when selecting ports