Fixed bug for when approaching bottom line to resize height