Handling Relative term error and last term error.