Renamed updateFlags to stateFlags.