Fix #13
Fixed interval bug