High-resolution ghost imaging through complex scattering media via a temporal correction