wip
fix resizing (was totally broken before)