fix #553 by handling Initial resize and OnSizeChanged