Fix bug in real layout justification