fix bug where bottom panel may slide off bottom of screen