fixed a bug in fraction method of interval class