VDI-1212: Broken top resize

Refactor