Fix incorrect code for text alignment