fixed a bug in interval