Avoid memory overflow