Fix for "NPE onSizeChanged" #41