Fixes a bug move/resize bug in Widget.