Fixed broken Apply instance for State, finished firstRepeat and distinct