When your scientific theory runs into trouble, either it's unable to explain certain things that were observed, or it just gave false predictions with regards to what you were supposed to observe, you generally have two options. You can 1) modify/expand your theory - so that it accomodates to the newly gathered data; or you 2) reject it and adopt a new one.
Introduction: The Discovery of Neptune
It's never completely obvious which option one ought to choose. For example, in 1821 French astronomer Alexis Bouvard published tables of the orbit of Uranus, making predictions of future positions of the planet based on Newton's laws of motion and gravitation (Bouvard 1821). However, subsequent observations revealed his predictions to be wrong - his tables were substantially off from what was actually observed.
