Fixed bug of using custom interval.