Fix positioning for text and image layers.