Make layouts more robust