A conservative modification to the ghost fluid method (GFM) is developed for compressible multiphase flows. The motivation is to eliminate or reduce the conservation error of the GFM without affecting its performance. We track the conservative variables near the material interface and use this information to modify the numerical solution for an interfacing cell when the interface has passed the cell. The modification procedure can be used on the GFM with any base schemes. In this paper we use the fifth order finite difference WENO scheme for the spatial discretization and the third order TVD Runge-Kutta method for the time discretization. The level set method is used to capture the interface. Numerical experiments show that the method is at least mass and momentum conservative and is in general comparable in numerical resolution with the original GFM.