Handle resize if width or height change (fixed logic bug)