Fixing bugs in resizement with draggable boxes