Preventing labels to be positioned off screen