Dealt with breaking when resizing