Fix onnresize and update edit section