add visibleRect
fixed debug