RPG: Trying to fix cast bug