A few changes made might have made a world of difference to this episode. Sometimes people get brain cramp and poor decisions are made. Other times it can seem like nothing is going right and the episode comes out well.
TNG's "Yesterday's Enterprise" is an example of when supposedly nothing went well on that production and yet somehow everything came out fine. Mind you the followup to those events resulting in Tasha Yar's daughter boggles my imagination.