Fixes resize issue