fixed bug with grounded term unifying with ungrounded term which is not possible