reconstruct layout, no more js problems