Solution to the Grandfather Paradox