Updated to work with new rpg-core lib