layout and routing fixes