fix bug:sometimes interval=0