RL logic error fixes