The reason the fort fired on you might be because the pirates are hostile to you. By raising a pirate flag, you can trick them into believing you are a pirate so that you can enter safely and exit safely, but there's always a slight risk that you might be recognized. I think that is the case here: You were recognized and that's why you were being fired upon.
About the crewmembers climbing up fallen masts: There's nothing much we can do about it. The crewmembers walk on a walk file that is not modified by the presence of the masts. So once the masts fall off, the crewmember still use the original walk file that was made for the ship WITH masts. Result: The crewmembers can climb into masts that have fallen off.
About the crewmembers climbing up fallen masts: There's nothing much we can do about it. The crewmembers walk on a walk file that is not modified by the presence of the masts. So once the masts fall off, the crewmember still use the original walk file that was made for the ship WITH masts. Result: The crewmembers can climb into masts that have fallen off.