Fixed "on_resize" scope.