gets the available space better, should prevent some infinite loops until the layout is done properly PR: bug id 3475 Submitted by: Paul Austin <p_d_austin@yahoo.com>