Fix positioning errors caused by different screen sizes.