Chimney Flashing

This is from a resort home in Ocean City MD. The metal chimney for the fire place exited the roof at location that did not line up with roof line so the installer hammered down the flashing and there is a gap between the flashing and the roof gutter.