Fix layout and table sizing problems