I think you made the right play. The other player just made a desperate move to try and get you to fold and got lucky with the hit!