temp fix for DnD, refactors railroad directive