“If you have a problem with the third act, the real problem is in the first act.”
This is some quote offers some great advice. If you’re having a problem later on in your story, you might have to look back. It’s likely the foundation of the story hasn’t been set up properly. Outlining your story in detail can really help you avoid this problem in the first place. If you’re not the type that likes to outline or it didn’t help in this case, it may be time to rewrite part of Act 1. Don’t worry, just keep writing and you’ll have a solid story on your hands sooner than you know it.