Make resize more accurate