Fixed problem with Arrays.toList() returning an unmodifiable collection.