Fix re-layout bug.