Added an integrity check