ensure proper layout size constraints