Fix to codex layout procedures