Fixes resize issues