fixed problem of getting interval value