Fixed integration code