Fix bug introduced with immutable data