implemented multi-resize-fix by blatx