fix text rendering if position is the last