Updated to work with RL2.0+