fixed funny bug/behavior with availWidth/Height