Improve support for compact layout