Fixed a bug that was throwing an UnsupportedOperationException.