Update state when props change