Minor bug fix

states -> readStates(pipelineId)