Fix regression on layout.js